// vite.config.ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { devPlugin, getReplacer } from "./plugins/devPlugin";
import optimizer from "vite-plugin-optimizer";
import { buildPlugin } from "./plugins/buildPlugin";

export default defineConfig({
  plugins: [optimizer(getReplacer()),devPlugin(), vue()],
  server: {
    host: '127.0.0.1', // 强制使用 IPv4
  },
  build: {
    rollupOptions: {
        plugins: [buildPlugin()],
    },
},
});